
********************************************************************************************************
*THIS DO-FILE REPLICATES TABLES 5 IN:                                                  			   
* PATRICIA FUNK: 							                       	
* "HOW ACCURATE ARE SURVEYED PREFERENCES FOR PUBLIC POLICIES? EVIDENCE FROM
* A UNIQUE INSTITUTIONAL SETUP"                                                                                         
********************************************************************************************************

global data ="[your path]"
global results ="[your path]"

clear all
set more off
set matsize 2000


use "$data\VOX_prepared", clear 

preserve

keep survey_bias  rec_SP important  yes_official year datum_id votenr
 
gen int_recSP_important=important*rec_SP
 
duplicates drop votenr, force
 
areg survey_bias   rec_SP important int_recSP_important yes_official,  absorb(year) cluster(datum_id)
outreg2 using "$results\tab5.xls", se 

areg survey_bias   rec_SP important  int_recSP_important yes_official,  absorb(datum_id) robust
outreg2 using "$results\tab5.xls", se append

restore

gen int_recSP_important=rec_SP*important

areg yes important int_recSP_important rec_SP yes_official if SPVoter==1, absorb(id) robust
outreg2 using "$results\tab5.xls", se append

areg yes important int_recSP_important rec_SP yes_official if SPVoter==1, absorb(id) robust
outreg2 using "$results\tab5.xls", se append


areg yes important int_recSP_important rec_SP  yes_official if CVPVoter==1, absorb(id) robust
outreg2 using "$results\tab5.xls", se append

areg yes important int_recSP_important rec_SP rec_CVP  yes_official if CVPVoter==1, absorb(id) robust
outreg2 using "$results\tab5.xls", se append

areg yes important int_recSP_important rec_SP  yes_official if FDPVoter==1, absorb(id) robust
outreg2 using "$results\tab5.xls", se append

areg yes important int_recSP_important rec_SP  yes_official rec_FDP if FDPVoter==1, absorb(id) robust
outreg2 using "$results\tab5.xls", se append


areg yes important int_recSP_important rec_SP  yes_official if SVPVoter==1, absorb(id) robust
outreg2 using "$results\tab5.xls", se append

areg yes important int_recSP_important rec_SP  yes_official rec_SVP if SVPVoter==1, absorb(id) robust
outreg2 using "$results\tab5.xls", se append


